1. Field of the Invention
This invention relates to a data compression method and a data compression system using the same; specifically to an image information compression method and an image information compression system using the same.
2. Description of the Prior Art
After images obtained from digital cameras are transformed into digital format to be stored in digital memory, digital cameras almost completely replace the conventional photo cameras. Furthermore, currently most mobile phones are fitted with digital cameras so that users can capture images and store the images in digital format in the memory of the mobile phones. In order to utilize the memory more efficiently, digital cameras and other electronic devices equipped with digital cameras normally have a digital image compression system to compress the digital images to reduce its data volume without reducing its image quality. In addition, memories of the electronic devices have different memory spaces and therefore a data compression rate is set in accordance with the memory space. Each digital image has an original data volume and the digital image compression system controls the data volume of the digital image based on its original data volume and the data compression rate. The above-mentioned data compression rate is the ratio between the original data volume and data volume of the compressed digital image. For instance, the digital image compression system with data compression rate of 5 will compress a 10M digital image to a 2M data image.
FIG. 1 is a block diagram of a conventional digital image compression system 10. As FIG. 1 shows, the conventional digital image compression system 10 has an image processing module 20, a space transformation module 30, a quantization module 40, a sequence transformation module 50, and a memory 60, wherein the memory 60 includes original image information 70. Furthermore, as FIG. 1 shows, the image processing module 20, the space transformation module 30, the quantization module 40, the sequence transformation module 50 and the memory 60 form a loop; in other words, the image processing module 20, the space transformation module 30, the quantization module 40, the sequence transformation module 50 will produce a compressed version of the original image information 70 and the original image information 70 is stored in the memory 60. The image processing module 20, the space transformation module 30, the quantization module 40, and the sequence transformation module 50 are connected in series. Furthermore, the original image information 70 has a plurality of pixel data and each pixel data represents the ratio between three primary colors (red, blue, and green) in one pixel.
In the conventional digital image compression system 10, the image processing module 20 reads the original image information 70 from the memory 60 and then processes the original image information 70. The color ratio among red, blue, and green in the original image information 70 is transformed into an 8×8 matrix, wherein each coefficient of the matrix represents the chromaticity of the image. The space transformation module 30 then transforms the original image information 70 according to the discrete cosine transformation theory. In other words, the space transformation module 30 transforms the original image information 70 from a space domain to a frequency domain. The quantization module 40 illustrated in FIG. 1 includes a quantization table, wherein the quantization table is a matrix having the same dimension as the original image information 70. Each coefficient of the quantization table corresponds to one coefficient of the original image information 70 so that the quantization module 40 can quantize the original image information 70. The sequence transformation module 50 then codes the original image information 70 to transform the original image information into a data sequence to be stored in the memory 60.
The conventional digital image compression system 10 includes a compression rate for the system to acquire a target data volume based on the compression rate and the data volume of the original image information 70. Furthermore, before storing the data sequence into the memory 60, the sequence transformation module 50 will compare the data volume of the data sequence with the target data volume. If the data volume of the data sequence does not reach the target data volume, the sequence transformation module 50 will discard the original data sequence and controls the quantization module 40 to adjust the quantization table. The image processing module 20, the space transformation module 30, the quantization module 40, and the sequence transformation module 50 will then repeat the processes mentioned above until the data volume of the data sequence reaches the target data volume.
However, before the data volume of the data sequence reaches the target data volume, the memory 60 will need a large storage space to store the original image information 70. Furthermore, the processes require repeatedly reading data from the memory 60 and thus will continuously occupy a portion of bandwidth of the memory 60. In addition, before the data sequence reaches the target data volume, the processes of repeatedly reading and transforming data will inevitably increase the power usage of the conventional digital image compression system 10.